package com.xiaoshuidi.cloud.module.system.api.oss;

import com.xiaoshuidi.cloud.module.system.service.oos.OosService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.InputStream;

import static com.xiaoshuidi.cloud.module.system.enums.ApiConstants.VERSION;

@RestController
@DubboService(version = VERSION) // 提供 Dubbo RPC 接口，给 Dubbo Consumer 调用
@Validated
public class OosApiImpl implements OosApi {

    @Resource
    private OosService oosService;

    @Override
    public InputStream oosDownloadFile(String path) {
        return oosService.oosDownloadFile(path);
    }
}
